#ifndef TRACKINGBASE_H
#define TRACKINGBASE_H

#include <QObject>
#include <trackingobject.h>

class TrackingBase : public QObject
{
    Q_OBJECT
public:
    explicit TrackingBase(QObject *parent = 0);
    ~TrackingBase();

    void updateObjectList(QList<CvRect> rectList);
    QList<TrackingObject> ObjectList();
    QList<TrackingObject> PredictedObjectList();

signals:

public slots:


protected:
    QList<TrackingObject> objectList;
    QList<TrackingObject> hiddenObjectList;

private:
    QList<TrackingObject> predictedObjectList;

    TrackingObject newTrackingObject(CvRect rect);
    void buildPredictedObjectList();
    void matchingObject(QList<CvRect> rectList);
    double computeDistance(CvRect rect1, CvRect rect2);
    void updateObject(int ID, CvRect rect);
};

#endif // TRACKINGBASE_H
